
#pragma once
#include "stdafx.h"
#include "one.h"



#include "cv.h"
#include "highgui.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>


 CvCapture* capture2 = 0;
 IplImage* imgnew=0;	

void Picture(IplImage* image,int bco)
{
char str2[30];
int i=0;
capture2 = cvCaptureFromCAM( 0 );
            for(i=0;i<20;i++)
              {

			cvGrabFrame(capture2);
	      imgnew = cvRetrieveFrame( capture2 );              
              }



cvResize(imgnew,image,CV_INTER_LINEAR);



	 
			sprintf(str2,"Ident/%d.jpg",bco); 
			
			if(image!=NULL)
			{
			cvSaveImage(str2 ,image); 
			}

cvReleaseCapture(&capture2);

}